

const { Model, DataTypes } = require('sequelize');
const sequelize = require('../config/database');
class Tag extends Model { }

Tag.init(
    {
        name: {
            comment: '标签名',
            type: DataTypes.STRING,
            allowNull: false,
            unique: true,
        },
        isDeleted: {
            comment: '是否删除',
            type: DataTypes.BOOLEAN,
            allowNull: false,
            defaultValue: false,
        },
    },
    {
        sequelize,
        modelName: "Tag",
    }
)

module.exports = Tag;